using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ResourceBlender_Express {
    /// <summary>
    /// A progress dialog.
    /// </summary>
    public partial class WinProgress : Window {
        /// <summary>
        /// Gets or sets whether the progress bar is indeterminate.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if the progress bar is indeterminate; otherwise, <c>false</c>.
        /// </value>
        public bool IsIndeterminate {
            get { return prgStatus.IsIndeterminate; }
            set { prgStatus.IsIndeterminate = value; }
        }

        /// <summary>
        /// Gets or sets the message displayed.
        /// </summary>
        /// <value>The message.</value>
        public string Message {
            get { return txtStatus.Text; }
            set { txtStatus.Text = value; }
        }

        /// <summary>
        /// Gets or sets the completion percentage (if this instance is determinate).
        /// </summary>
        /// <value>The value.</value>
        public double Value {
            get { return prgStatus.Value; }
            set { prgStatus.Value = value; }
        }

        /// <summary>
        /// Initializes a new <see cref="WinProgress"/>.
        /// </summary>
        public WinProgress() {
            InitializeComponent();
        }
        /// <summary>
        /// Initializes a new <see cref="WinProgress"/> with the specified initial message.
        /// </summary>
        /// <param name="initialmessage">The initialmessage.</param>
        /// <param name="isIndeterminate"><c>true</c> if this instance is determinate.</param>
        public WinProgress(string initialmessage, bool isIndeterminate)
            : this() {
            txtStatus.Text = initialmessage;
            prgStatus.IsIndeterminate = isIndeterminate;
        }
    }
}
